#include <stdio.h>

int main() {
    // 直接BF
    int n;
    scanf("%d", &n);
    for (int a = 1; a <= n; a++) {
        for (int b = a + 1; b <= n - a; b++) {
            int c = n - a - b;
            if (a * a + b * b == c * c) {
                printf("%d", a * b * c);
                return 0;
            }
        }
    }
    return 0;
}